package com.xyw.code.platform.common.entity.dto;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.xyw.code.common.core.util.LongJsonDeserializer;
import com.xyw.code.common.core.util.LongJsonSerializer;
import com.xyw.code.common.core.util.LongListJsonSerializer;
import lombok.Data;

import java.util.List;

/**
 * Created by xuyiwei on 2019/8/7.
 */
@Data
public class UserDTO {

    private Integer page;
    private Integer pageSize;
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long id;
    private String username;
    private String nickName;
    private String password;
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long deptId;
    @JsonDeserialize(using = LongJsonDeserializer.class)
    @JsonSerialize(using = LongJsonSerializer.class)
    private Long jobId;
    private String phone;
    private String email;
    private String avatar;
    private Integer lockFlag;
    @JsonSerialize(using = LongListJsonSerializer.class)
    private List<Long> roleList;
    @JsonSerialize(using = LongListJsonSerializer.class)
    private List<Long> deptList;
    /**
     * 新密码
     */
    private String newPassword;
}
